Skip to content

Exception logs probe#375

Merged
rmcdaniel merged 27 commits intomasterfrom
codex/probing-tentative-replay
Apr 5, 2026
Merged

Exception logs probe#375
rmcdaniel merged 27 commits intomasterfrom
codex/probing-tentative-replay

Conversation

@rmcdaniel
Copy link
Copy Markdown
Member

@rmcdaniel rmcdaniel commented Apr 3, 2026

Summary

This change replaces the global "any prior Workflow\\Exception log" suppression with a replay probe.

When an exception job arrives for a missing log index, we now:

  • append a synthetic in-memory exception log to the loaded workflow history
  • replay the workflow in a probing mode that does not dispatch missing work or execute side effects
  • persist the real exception log only if replay actually matches that exact exception on the active path

This preserves the child-exception propagation fix from #348 while avoiding the later logging regression reported in #372.

Root cause

1.0.70 changed exception persistence from "one log per index" to "only the first exception log anywhere in the workflow". That deduped stale parallel sibling failures, but it also suppressed legitimate later exceptions after:

  • signal-driven retries
  • consecutive caught failures at new indexes

Heuristics like "previous log is an exception" or "same replay timestamp" were still too coarse, because real workflows can catch one exception and then legitimately hit another failure without any neutral log in between.

What changed

  • add a probing replay mode to WorkflowStub / Workflow
  • prevent probing replays from dispatching missing activities, children, timers, side effects, or versions
  • pass the failing child source class into Workflow\\Exception jobs
  • only persist an exception log if the probing replay matches that exact (index, class) on the live path
  • add regression coverage for:
    • signal-driven retries logging multiple sequential exceptions
    • back-to-back caught failures logging multiple sequential exceptions
    • parallel child failures still deduping to one parent exception log

@rmcdaniel rmcdaniel changed the title [codex] Probe replay before persisting exception logs Exception logs probe Apr 3, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (85ee8ed) to head (8625db8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##              master      #375    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity       597       661    +64     
============================================
  Files             63        63            
  Lines           2077      2246   +169     
============================================
+ Hits            2077      2246   +169     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as resolved.

@rmcdaniel rmcdaniel marked this pull request as ready for review April 5, 2026 03:54
@rmcdaniel rmcdaniel merged commit 5126913 into master Apr 5, 2026
7 checks passed
@rmcdaniel rmcdaniel deleted the codex/probing-tentative-replay branch April 5, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants